function generateUrl(url) {
        var p = {
            // 增加时间戳，解决IE浏览器ajax请求缓存问题
            _t: new Date().getTime()
        };

        var operator = /\?/gi.test(url) ? '&' : '?';
        return url + operator + $.param(p);
    }

function() {
  if ($("#login-form").valid()) {
    var formParam = $("#login-form").serializeObject();
    http.httpRequest({
      url: '/sment/login/doLogin',
      type: 'post',
      data: formParam,
      success: function(data) {
        //用户名不重名
        if (data.status == 'success' && data.data == "1") {
          //如果选择记住密码则往cookie中存用户名和密码 否则设置为空
          if ($('input[name="rememberpassword"]:checked').length > 0) {
            //有效期2年
            this.expires = 720 * 24 * 3600 * 1000;
            icinfo.cookie.set("cs.sment.username", $.trim($('#username').val()), this);
            icinfo.cookie.set("cs.sment.password", $.trim($('#password').val()), this);
          } else {
            icinfo.cookie.set("cs.sment.username", "");
            icinfo.cookie.set("cs.sment.password", "");
          }
          location.assign('/sment/login/sment_index');
          return;
        } else if (data.status == 'success' && data.data == "2") { //用户重名则选择登记机关
          showRegorg();
          return;
        }
        $('.js-checkcode').trigger('click');
        data.msg && layer.msg(data.msg, {
          time: 3000
        });
      }
    });
  }

}
